<?php

class Default_Plugin_Navigation extends Zend_Controller_Plugin_Abstract
{

    public function preDispatch(Zend_Controller_Request_Abstract $request)
    {
		$container = new Zend_Navigation();
		$module = $request->getModuleName();
		$filename = "modules/{$module}/configs/menu.xml";
		if (is_readable($filename))
		{
			$config = new Zend_Config_Xml($filename);
			$container->addPages($config);
		}
		Zend_Registry::set('Zend_Navigation', $container);
	}

}

?>